import { fetchData,postData,delData } from '../../api/index';

export default function(){
    let sam_url = "/api/sample";
    let getSampleDisp = async () => {
        try {
            const res = await fetchData(sam_url);
            return res
        } catch (error) {
        }
    }
    let postSampleDisp = <T>(data:T) => {
        try {
            const res = postData(sam_url,data);
            return res
        } catch (error) {

        }
    }
   
    return { getSampleDisp,postSampleDisp }
}